package com.px.state;

import com.intellij.openapi.components.PersistentStateComponent;
import com.intellij.openapi.components.State;
import com.intellij.openapi.components.Storage;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

/**
 * @author px
 * @createTime 2024/11/21 21:51
 */
@State(
        name = "com.px.state.Px2VhState",
        storages = {@Storage("Px2VhState.xml")}
)
public class Px2VhState implements PersistentStateComponent<Px2VhState.PluginState> {
    private PluginState myState = new PluginState();
    public static class PluginState {
        public String height = "1080";
    }
    @Nullable
    @Override
    public PluginState getState() {
        return myState;
    }
    @Override
    public void loadState(@NotNull PluginState state) {
        myState = state;
    }
    public void setHeight(String input) {
        myState.height = input;
    }
    public String getHeight() {
        return myState.height;
    }
}